package com.chaodev.base.dto;

import com.chaodev.base.model.LunBo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import java.io.Serializable;
import java.util.List;

/**
 * @author zyf
 * @description 轮播图请求实体类
 * @date 2023-09-20 9:57
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class LunBoDto extends LunBo implements Serializable {
    private static final long serialVersionUID = -7200880157752851822L;

    @Min(value = 1, message = "当前页不能小于1")
    @ApiModelProperty(value = "当前页")
    private int page;

    @Min(value = 1, message = "每页条数不能小于1")
    @ApiModelProperty(value = "每页条数")
    private int rows;

    @ApiModelProperty(value = "id列表")
    private List<Integer> ids;

    @Override
    public String toString() {
        return "{" +
                "\"page\":" + page +
                ",\"rows\":" + rows +
                ",\"ids\":" + ids +
                "} " + super.toString();
    }
}
